package tiandang.core.form;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

public class ProductForm {

  private Integer id;

  @NotBlank(message = "商品名称不能为空")
  private String name;
  private String imgUrl;
  private String imgName;

  @NotNull(message = "商品原价不能为空")
  @Min(value = 0, message = "商品原价必须大于0")
  private BigDecimal originPrice;

  @NotNull(message = "商品现价不能为空")
  @Min(value = 0, message = "商品现价必须大于0")
  private BigDecimal presentPrice;

  @NotNull(message = "团长佣金占比不能为空")
  @Min(value = 0, message = "团长佣金占比必须大于0")
  private Integer proportion;

  @NotNull(message = "库存不能为空")
  private Integer stock;

  @NotBlank(message = "商品描述信息不能为空")
  private String description;

  private Byte isLimit;

  private Integer limitBuy;

  private Integer mock;

  public Integer getLimitBuy() {
    return limitBuy;
  }

  public void setLimitBuy(Integer limitBuy) {
    this.limitBuy = limitBuy;
  }

  public Integer getMock() {
    return mock;
  }

  public void setMock(Integer mock) {
    this.mock = mock;
  }

  public Byte getIsLimit() {
    return isLimit;
  }

  public void setIsLimit(Byte isLimit) {
    this.isLimit = isLimit;
  }

  public Integer getId() {
    return id;
  }

  public void setId(Integer id) {
    this.id = id;
  }

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public String getImgUrl() {
    return imgUrl;
  }

  public void setImgUrl(String imgUrl) {
    this.imgUrl = imgUrl;
  }

  public String getImgName() {
    return imgName;
  }

  public void setImgName(String imgName) {
    this.imgName = imgName;
  }

  public BigDecimal getOriginPrice() {
    return originPrice;
  }

  public void setOriginPrice(BigDecimal originPrice) {
    this.originPrice = originPrice;
  }

  public BigDecimal getPresentPrice() {
    return presentPrice;
  }

  public void setPresentPrice(BigDecimal presentPrice) {
    this.presentPrice = presentPrice;
  }

  public Integer getProportion() {
    return proportion;
  }

  public void setProportion(Integer proportion) {
    this.proportion = proportion;
  }

  public Integer getStock() {
    return stock;
  }

  public void setStock(Integer stock) {
    this.stock = stock;
  }

  public String getDescription() {
    return description;
  }

  public void setDescription(String description) {
    this.description = description;
  }
}
